package com.ruoyi.tplus.Vars;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;


@Component
public class OrderMap {

    private static Map businessTypeMap = new HashMap();
    private static Map invoiceTypeMap = new HashMap();
    private static Map payTypeMap = new HashMap();

    @Value("${tplus.ptfk}")
    private String ptfk;
    @Value("${tplus.yfk}")
    private String yfk;
    @Value("${tplus.zjfk}")
    private String zjfk;
    @Value("${tplus.ptsk}")
    private String ptsk;
    @Value("${tplus.ysk}")
    private String ysk;

    @Value("${tplus.zjsk}")
    private String zjsk;
    //结算方式

    public static String settleStyle;

    @Value("${tplus.settleStyle}")
    public String setSettleStyle() {
        return settleStyle;
    }


    /**
     * 业务类型
     * @return
     */
    public static Map<String,String> getBusinessType(){

        businessTypeMap.put("普通采购", "01");
        businessTypeMap.put("采购退货", "02");
        return businessTypeMap;
    }

    /**
     * 票据类型
     * @return
     */
    public static Map<String,String> getInvoiceType(){
        invoiceTypeMap.put("专用发票", "147");
        invoiceTypeMap.put("普通发票", "51132");
        invoiceTypeMap.put("农副产品发票", "458");
        invoiceTypeMap.put("收据", "85");
        return invoiceTypeMap;
    }

    /**
     * 付款方式
     * @return 付款方式Map
     */
    public static Map<String,String> getPayTypee(){
        payTypeMap.put("全额现结", "135");
        payTypeMap.put("月结", "81");
        payTypeMap.put("全额订金", "284");
        payTypeMap.put("限期付款", "78");
        payTypeMap.put("其它", "457");
        return payTypeMap;
    }
    /**
     * 收款单业务类型  map中存 : 业务类型名称：id
     */
 /*   public static Map<String,String> getReceivementBusiType(){
        businessTypeMap.put("普通收款", "15");
        businessTypeMap.put("预收款", "16");
        businessTypeMap.put("直接收款", "79");
        return businessTypeMap;
    }*/
    /**
     * 款单业务类型
     */
    /*public static Map<String,String> getPayBusiType(){
        businessTypeMap.put("普通付款款", "17");
        businessTypeMap.put("预付款", "18");
        businessTypeMap.put("直接付款", "80");
        return businessTypeMap;
    }*/
    /**
     * 款单业务类型
     */
    public Map<String,String> getReceiveAndPayBusiType(){
        Map<String,String> localMap = new HashMap<>();
        localMap.put("普通付款", ptfk);
        localMap.put("预付款", yfk);
        localMap.put("直接付款", zjfk);

        localMap.put("普通收款", ptsk);
        localMap.put("预收款", ysk);
        localMap.put("直接收款", zjsk);
        return localMap;
    }



}
